/**
 *  @互联家
 *  @互联家商户工作台页面
 */

import React, { Component } from 'react';
import { StyleSheet, ScrollView, View, Text, Image, TouchableHighlight } from 'react-native';

/**
 *  @style 主要样式导入
 */
import IndexStyle from "../styles/index";

/**
 *  @icon  icon图像引入
 */
const indexTitleImage = require("../assets/images/icon/indexTitle.png");

const beforePay = require("../assets/images/icon/beforePay.png");
const beforeKey = require("../assets/images/icon/beforeKey.png");
const complete = require("../assets/images/icon/complete.png");
const beforeReply = require("../assets/images/icon/beforeReply.png");
const scan = require("../assets/images/icon/scan.png");
const refund = require("../assets/images/icon/refund.png");

const todayTurnover = require("../assets/images/icon/todayTurnover.png");
const yesterdayTurnover = require("../assets/images/icon/yesterdayTurnover.png");
const totalTurnover = require("../assets/images/icon/totalTurnover.png");
const drawFee = require("../assets/images/icon/drawFee.png");
const drawRecord = require("../assets/images/icon/drawRecord.png");

const hotel = require("../assets/images/icon/hotel.png");
const roomModel = require("../assets/images/icon/roomModel.png");
const classRoom = require("../assets/images/icon/classRoom.png");
const roomFee = require("../assets/images/icon/roomFee.png");


export default class HomeScreen extends Component {

  render() {
    return (
      <ScrollView style={styles.indexBox}>
        <View style={styles.statisticsTitle}>
          <Image style={styles.statisticsTitleImage} source={indexTitleImage} />
          <Text style={styles.statisticsTitleText}>今日营业统计</Text>
        </View>
        <View style={styles.statistics}>
          <View style={styles.statisticsItem}>
            <Text style={styles.statisticsRed}>1670</Text>
            <Text style={styles.statisticsIns}>今日订单</Text>
          </View>
          <View style={styles.statisticsItem}>
            <Text style={styles.statisticsNormal}>501</Text>
            <Text>今日销售额</Text>
          </View>
          <View style={styles.statisticsItem}>
            <Text style={styles.statisticsNormal}>8874</Text>
            <Text>月销售额</Text>
          </View>
          <View style={styles.statisticsItem}>
            <Text style={styles.statisticsNormal}>8874</Text>
            <Text>总销售额</Text>
          </View>
        </View>
        <View style={styles.classTitle}>
          <Text style={styles.classTitleText}>订单管理</Text>
        </View>
        <View style={styles.classContainerBorder}>
          <TouchableHighlight style={styles.classContainerItem} underlayColor="#ffffff" onPress={() => this.props.navigation.navigate('OrderList')}>
            <View style={styles.classContainerItem}>
              <Image style={styles.classContainerItemImage} source={beforePay} />
              <Text style={styles.classContainerItemText}>待支付</Text>
            </View>
          </TouchableHighlight>
          <TouchableHighlight style={styles.classContainerItem} underlayColor="#ffffff" onPress={() => this.props.navigation.navigate('OrderList')}>
            <View style={styles.classContainerItem}>
              <Image style={styles.classContainerItemImage} source={beforeKey} />
              <Text style={styles.classContainerItemText}>待入住</Text>
            </View>
          </TouchableHighlight>
          <TouchableHighlight style={styles.classContainerItem} underlayColor="#ffffff" onPress={() => this.props.navigation.navigate('OrderList')}>
            <View style={styles.classContainerItem}>
              <Image style={styles.classContainerItemImage} source={complete} />
              <Text style={styles.classContainerItemText}>已完成</Text>
            </View>
          </TouchableHighlight>
        </View>
        <View style={styles.classContainer}>
          <TouchableHighlight style={styles.classContainerItem} underlayColor="#ffffff" onPress={() => this.props.navigation.navigate('OrderList')}>
            <View style={styles.classContainerItem}>
              <Image style={styles.classContainerItemImage} source={beforeReply} />
              <Text style={styles.classContainerItemText}>待回复</Text>
            </View>
          </TouchableHighlight>
          <View style={styles.classContainerItem}>
            <Image style={styles.classContainerItemImage} source={scan} />
            <Text style={styles.classContainerItemText}>扫码核销订单</Text>
          </View>
          <TouchableHighlight style={styles.classContainerItem} underlayColor="#ffffff" onPress={() => this.props.navigation.navigate('OrderList')}>
            <View style={styles.classContainerItem}>
              <Image style={styles.classContainerItemImage} source={refund} />
              <Text style={styles.classContainerItemText}>退款订单</Text>
            </View>
          </TouchableHighlight>
        </View>
        <View style={styles.classTitle}>
          <Text style={styles.classTitleText}>财务管理</Text>
        </View>
        <View style={styles.classContainerBorder}>
          <TouchableHighlight style={styles.classContainerItem} underlayColor="#ffffff" onPress={() => this.props.navigation.navigate('SalesAmount')}>
            <View style={styles.classContainerItem}>
              <Image style={styles.classContainerItemImage} source={todayTurnover} />
              <Text style={styles.classContainerItemText}>今日营业额</Text>
            </View>
          </TouchableHighlight>
          <View style={styles.classContainerItem}>
            <Image style={styles.classContainerItemImage} source={yesterdayTurnover} />
            <Text style={styles.classContainerItemText}>昨日营业额</Text>
          </View>
          <View style={styles.classContainerItem}>
            <Image style={styles.classContainerItemImage} source={totalTurnover} />
            <Text style={styles.classContainerItemText}>总营业额</Text>
          </View>
        </View>
        <View style={styles.classContainer}>
          <TouchableHighlight style={styles.classContainerItem} underlayColor="#ffffff" onPress={() => this.props.navigation.navigate('ApplyMoney')}>
            <View style={styles.classContainerItem}>
              <Image style={styles.classContainerItemImage} source={drawFee} />
              <Text style={styles.classContainerItemText}>商户提现</Text>
            </View>
          </TouchableHighlight>
          <TouchableHighlight style={styles.classContainerItem} underlayColor="#ffffff" onPress={() => this.props.navigation.navigate('ApplyDetail')}>
            <View style={styles.classContainerItem}>
              <Image style={styles.classContainerItemImage} source={drawRecord} />
              <Text style={styles.classContainerItemText}>提现记录</Text>
            </View>
          </TouchableHighlight>
          <View style={styles.classContainerItem}></View>
        </View>
        <View style={styles.classTitle}>
          <Text style={styles.classTitleText}>酒店管理</Text>
        </View>
        <View style={styles.classContainerBorder}>
          <TouchableHighlight style={styles.classContainerItem} underlayColor="#ffffff" onPress={() => this.props.navigation.navigate('HotalMange')}>
            <View style={styles.classContainerItem}>
              <Image style={styles.classContainerItemImage} source={hotel} />
              <Text style={styles.classContainerItemText}>酒店管理</Text>
            </View>
          </TouchableHighlight>
          <TouchableHighlight style={styles.classContainerItem} underlayColor="#ffffff" onPress={() => this.props.navigation.navigate('RoomList')}>
            <View style={styles.classContainerItem}>
              <Image style={styles.classContainerItemImage} source={roomModel} />
              <Text style={styles.classContainerItemText}>房型管理</Text>
            </View>
          </TouchableHighlight>
          <TouchableHighlight style={styles.classContainerItem} underlayColor="#ffffff" onPress={() => this.props.navigation.navigate('RoomProtect')}>
          <View style={styles.classContainerItem}>
            <Image style={styles.classContainerItemImage} source={classRoom} />
            <Text style={styles.classContainerItemText}>房间维护</Text>
          </View>
          </TouchableHighlight>
        </View>
        <View style={styles.classContainer}>
          <View style={styles.classContainerItem}>
            <Image style={styles.classContainerItemImage} source={roomFee} />
            <Text style={styles.classContainerItemText}>房价维护</Text>
          </View>
          <View style={styles.classContainerItem}></View>
          <View style={styles.classContainerItem}></View>
        </View>
      </ScrollView>
    )
  };
};

const styles = StyleSheet.create(IndexStyle);